import Vue from "vue";
import Vuex from "vuex";

import appClient from "./store/app_client";
import common from "./store/common";

import role from "./store/role";
import department from "./store/department";
import slide from "./store/slide";
import activity from "./store/activity";
import childActivity from "./store/childActivity";
import childHome from "./store/childHome";
import legal from "./store/legal";
import news from "./store/news";
import caseMethod from "./store/caseMethod";
import knowledge from "./store/knowledge";
import team from "./store/team";
import volunteer from "./store/volunteer";
import user from "./store/user";
import group from "./store/group";

import setting from "./store/setting";
import controlRoom from "./store/controlRoom";
import suggestion from "./store/suggestion";
import discuss from "./store/discuss";
import video from "./store/video";
import videoQuestion from "./store/videoQuestion";
import question from "./store/question";
import scoreRecord from "./store/scoreRecord";
import task from "./store/task";
import gift from "./store/gift";
import order from "./store/order";
import statistic from "./store/statistic";
import questionClass from "./store/questionClass";
import departCategory from "./store/departCategory";
Vue.use(Vuex);

const store = new Vuex.Store({
  modules: {
    appClient,
    common,
    role,
    department,
    slide,
    activity,
    childActivity,
    childHome,
    legal,
    news,
    caseMethod,
    knowledge,
    team,
    volunteer,
    user,
    group,
    setting,
    controlRoom,
    suggestion,
    discuss,
    video,
    videoQuestion,
    question,
    scoreRecord,
    task,
    gift,
    order,
    statistic,
    questionClass,
    departCategory
  }
});

// is useless
// if (module.hot) {
//   module.hot.accept(["./store/app_client"], () => {
//     store.hotUpdate({
//       modules: {
//         client: import("./store/app_client")
//       }
//     });
//   });
// }

export default store;
